//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Web.UI.WebControls;

namespace CommunityServer.Controls
{
	/// <summary>
	/// Summary description for DropDownPropertyFilter.
	/// </summary>
	public class PropertyFilterDropDownList : DropDownList
	{
		public PropertyFilterDropDownList()
		{
			this.Items.Add(new ListItem("Ignore", "Ignore"));
            this.Items.Add(new ListItem("True", "True"));
            this.Items.Add(new ListItem("False", "False"));
		}

        public bool IsTrue
        {
            get{ return this.SelectedIndex == 1;}
        }

        public bool IsFalse
        {
            get {return this.SelectedIndex == 2;}
        }

        public bool IsIgnore
        {
            get {return this.SelectedIndex == 0;}
        }

        private string _ignoreText = "Ignore";
        public string IgnoreText
        {
            get{return _ignoreText;}
            set
            {
                this.Items[0].Text = value;
                _ignoreText = value;
            }
        }
	}
}
